package com.bjqg.bjqg01.bjqg.bean;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Generated;

import java.io.Serializable;

/**
 * Created by bjqg01 on 2017/12/14.
 */
@Entity
public class Client implements Parcelable{

    @Id
    private Long id;
    @Property(nameInDb = "CLIENT")
    private String client;
    @Property(nameInDb = "CLIENTPHONENUM")
    private String clientPhoneNum;
    @Property(nameInDb = "CLIENTCOMPANY")
    private String clientCompany;
    @Property(nameInDb = "PROJECTNAME")
    private String projectName;
    @Property(nameInDb = "BUILDCOMPANY")
    private String buildCompany;
    @Property(nameInDb = "SAMPLEPERSON")
    private String samplePerson;
    @Property(nameInDb = "SAMPLECOMPANY")
    private String sampleCompany;
    @Property(nameInDb = "WITNESSPERSON")
    private String witnessPerson;
    @Property(nameInDb = "WITNESSCOMPANY")
    private String witnessCompany;
    @Property(nameInDb = "CHOOSE")
    private Boolean choose;
    @Generated(hash = 834367975)
    public Client(Long id, String client, String clientPhoneNum,
            String clientCompany, String projectName, String buildCompany,
            String samplePerson, String sampleCompany, String witnessPerson,
            String witnessCompany, Boolean choose) {
        this.id = id;
        this.client = client;
        this.clientPhoneNum = clientPhoneNum;
        this.clientCompany = clientCompany;
        this.projectName = projectName;
        this.buildCompany = buildCompany;
        this.samplePerson = samplePerson;
        this.sampleCompany = sampleCompany;
        this.witnessPerson = witnessPerson;
        this.witnessCompany = witnessCompany;
        this.choose = choose;
    }
    @Generated(hash = 1485887936)
    public Client() {
    }

    protected Client(Parcel in) {
        id=in.readLong();
        client = in.readString();
        clientPhoneNum = in.readString();
        clientCompany = in.readString();
        projectName = in.readString();
        buildCompany = in.readString();
        samplePerson = in.readString();
        sampleCompany = in.readString();
        witnessPerson = in.readString();
        witnessCompany = in.readString();
    }

    public static final Creator<Client> CREATOR = new Creator<Client>() {
        @Override
        public Client createFromParcel(Parcel in) {
            return new Client(in);
        }

        @Override
        public Client[] newArray(int size) {
            return new Client[size];
        }
    };

    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getClient() {
        return this.client;
    }
    public void setClient(String client) {
        this.client = client;
    }
    public String getClientPhoneNum() {
        return this.clientPhoneNum;
    }
    public void setClientPhoneNum(String clientPhoneNum) {
        this.clientPhoneNum = clientPhoneNum;
    }
    public String getClientCompany() {
        return this.clientCompany;
    }
    public void setClientCompany(String clientCompany) {
        this.clientCompany = clientCompany;
    }
    public String getProjectName() {
        return this.projectName;
    }
    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }
    public String getBuildCompany() {
        return this.buildCompany;
    }
    public void setBuildCompany(String buildCompany) {
        this.buildCompany = buildCompany;
    }
    public String getSamplePerson() {
        return this.samplePerson;
    }
    public void setSamplePerson(String samplePerson) {
        this.samplePerson = samplePerson;
    }
    public String getSampleCompany() {
        return this.sampleCompany;
    }
    public void setSampleCompany(String sampleCompany) {
        this.sampleCompany = sampleCompany;
    }
    public String getWitnessPerson() {
        return this.witnessPerson;
    }
    public void setWitnessPerson(String witnessPerson) {
        this.witnessPerson = witnessPerson;
    }
    public String getWitnessCompany() {
        return this.witnessCompany;
    }
    public void setWitnessCompany(String witnessCompany) {
        this.witnessCompany = witnessCompany;
    }
    public Boolean getChoose() {
        return this.choose;
    }
    public void setChoose(Boolean choose) {
        this.choose = choose;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(id);
        dest.writeString(client);
        dest.writeString(clientPhoneNum);
        dest.writeString(clientCompany);
        dest.writeString(projectName);
        dest.writeString(buildCompany);
        dest.writeString(samplePerson);
        dest.writeString(sampleCompany);
        dest.writeString(witnessPerson);
        dest.writeString(witnessCompany);
    }
}
